package cn.bob.feign;

import cn.bob.domain.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @author bob
 * @data 2022/11/9-10:08
 */

//@FeignClient(name="user-server",fallbackFactory = PayfallbackFactory.class)
@FeignClient(name="user-server",fallback = PayClientFallback.class)
public interface UserServer {
    //使用注入feign
    @GetMapping("/user/{id}")
    User getUser(@PathVariable("id") Long id);
}
